import { NoSkinCellRenderer } from "../../common/item/NoSkinCellRenderer";
import { ObjCreate } from "../../common/ObjCreate";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { GangFightsMagicStoneData } from "../data/GangFightsMagicStoneData";
//class GangFightsMagicStoneCellRenderer
    
    export  class GangFightsMagicStoneCellRenderer extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            ObjCreate.createBg(0, 0, 230, 2, this, "SplitLine");
            var loc1=GlobalStyle.getTextFormatCenter(GlobalStyle.textFormat1);
            this._tfScore = ObjCreate.createTextField("", 0, 7, 85, 20, this, loc1);
            this._tfReward = ObjCreate.createTextField("", 130, 7, 88, 20, this, loc1);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            if (typeof arg1 === "gangfightsmagicstonedata") 
            {
                this._magicStoneData = arg1 as GangFightsMagicStoneData;
                this.updateView();
            }
            return;
        }

        /* internal  */updateView(): void
        {
            this._tfScore.text = this._magicStoneData.score;
            this._tfReward.text = this._magicStoneData.magicStone;
            return;
        }

        /* internal */ /* var */_magicStoneData: GangFightsMagicStoneData;

        /* internal */ /* var */_tfScore: Object /* flash.text.TextField */;

        /* internal */ /* var */_tfReward: Object /* flash.text.TextField */;
    }
